import 'dart:async';

import 'package:flutter/services.dart';

class PluginGetVersion {
  static const MethodChannel _channel =
      const MethodChannel('plugin_get_version');

  ///获取系统版本号
  static Future<String?> get platformVersion async {
    final String? version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }

  ///获取APP版本号
  static Future<String?> get appVersionCode async {
    final String? version = await _channel.invokeMethod('getAppVersionCode');
    return version;
  }

  ///获取APP版本名称
  static Future<String?> get appVersionName async {
    final String? version = await _channel.invokeMethod('getAppVersionName');
    return version;
  }
}
